package com.bana.fvs.app.mvp.contract;

import android.app.Activity;

import com.bana.fvs.app.module.detaile.entity.AreaControllerDetailBean;
import com.bana.fvs.app.module.detaile.entity.StrategieEntry;
import com.bana.fvs.app.module.detaile.entity.UpdateWorkModeResultBean;
import com.bana.fvs.app.module.detaile.entity.WorkModeItemBean;
import com.bana.fvs.app.mvp.model.BaseModel;
import com.bana.fvs.app.mvp.presenter.BasePresenter;
import com.bana.fvs.app.mvp.view.IBaseView;
import com.wei.commonlibrary.net.CommException;
import com.wei.commonlibrary.net.OkhttpRequest;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * Created by wei on 2018/3/2.
 */

public interface FoglightContract {
    abstract class AbsFoglightModel extends BaseModel {

        /**
         * 获取雾灯控制列表
         * @param token
         * @return
         */
        public abstract OkhttpRequest getFoglightMode(String token);

        /**
         * 修改雾灯控制
         * @param token
         * @param data
         * @param
         * @return
         */
        public abstract OkhttpRequest http_foglightWorkModeUpdate(String token, HashMap<String, Object> data);

        /**
         * 控制策略列表
         * @param token
         * @param data
         * @param
         * @return
         */
        public abstract OkhttpRequest http_getStrategies(String token, HashMap<String, Object> data);


        /**
         * 雾灯控制器列表
         * @param token
         * @param data
         * @param
         * @return
         */
        public abstract OkhttpRequest http_getControllers(String token, HashMap<String, Object> data);



    }

    abstract class AbsFoglightPresenter extends BasePresenter<AbsFoglightModel, IFoglightView> {
        public abstract void getFoglightMode(Activity activity,String token);
        public abstract void http_foglightWorkModeUpdate(Activity activity, String token, HashMap<String, Object> data);
        public abstract void http_getStrategies(Activity activity, String token, HashMap<String, Object> data);
        public abstract void http_getControllers(Activity activity, String token, HashMap<String, Object> data);
    }

    interface IFoglightView extends IBaseView {
        void getFogLightMode(List<WorkModeItemBean> workMeItemBeanList);
        void getFogLightModeError(CommException e);
        void updtaeFogLightMode(ArrayList<UpdateWorkModeResultBean.Item2Bean> updateWorkModeResultBean);
        void getStrategiesResult(ArrayList<StrategieEntry> strategies);
        void getControllersResult(ArrayList<AreaControllerDetailBean> strategies);
        void getStrategiesError(CommException e);
    }
}
